const express = require('express');
const app = express();
const cors = require('cors')
app.use(cors())
app.use(express.urlencoded({ extended: false }))
app.use(express.json())
    // app.get('/', function(req, res) {
    //     res.send('Hello World');
    // })
const userRoute = require('./router/user')
const articleRoute = require('./router/article')
app.use('/api', userRoute)
app.use('/api', articleRoute)
app.use('/public', express.static('public'))
app.listen(8081, () => {

    console.log("服务器启动")

})